<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/10/19
 * Time: 20:14
 */

namespace App\Transformers;


use App\Models\Banner;
use League\Fractal\TransformerAbstract;

class BannerTransformer extends TransformerAbstract
{
    public function transform(Banner $item){
        return[
            'img_url' => $item->img_url,
            'url' => $item->url,
            'sort' => $item->sort,
        ];
    }


}